package com.ruoyi.zzw.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zzw.mapper.DatasourceManageMapper;
import com.ruoyi.zzw.domain.DatasourceManage;
import com.ruoyi.zzw.service.TDatasourceManageService;

/**
 * 数据资源Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-06
 */
@Service
public class DatasourceManageServiceImpl implements TDatasourceManageService
{
    @Autowired
    private DatasourceManageMapper datasourceManageMapper;

    /**
     * 查询数据资源
     * 
     * @param cResourceId 数据资源主键
     * @return 数据资源
     */
    @Override
    public DatasourceManage selectTDatasourceManageByCResourceId(Long cResourceId)
    {
        return datasourceManageMapper.selectTDatasourceManageByCResourceId(cResourceId);
    }

    /**
     * 查询数据资源列表
     * 
     * @param datasourceManage 数据资源
     * @return 数据资源
     */
    @Override
    public List<DatasourceManage> selectTDatasourceManageList(DatasourceManage datasourceManage)
    {
        return datasourceManageMapper.selectTDatasourceManageList(datasourceManage);
    }

    /**
     * 新增数据资源
     * 
     * @param datasourceManage 数据资源
     * @return 结果
     */
    @Override
    public int insertTDatasourceManage(DatasourceManage datasourceManage)
    {
        return datasourceManageMapper.insertTDatasourceManage(datasourceManage);
    }

    /**
     * 修改数据资源
     * 
     * @param datasourceManage 数据资源
     * @return 结果
     */
    @Override
    public int updateTDatasourceManage(DatasourceManage datasourceManage)
    {
        return datasourceManageMapper.updateTDatasourceManage(datasourceManage);
    }

    /**
     * 批量删除数据资源
     * 
     * @param cResourceIds 需要删除的数据资源主键
     * @return 结果
     */
    @Override
    public int deleteTDatasourceManageByCResourceIds(Long[] cResourceIds)
    {
        return datasourceManageMapper.deleteTDatasourceManageByCResourceIds(cResourceIds);
    }

    /**
     * 删除数据资源信息
     * 
     * @param cResourceId 数据资源主键
     * @return 结果
     */
    @Override
    public int deleteTDatasourceManageByCResourceId(Long cResourceId)
    {
        return datasourceManageMapper.deleteTDatasourceManageByCResourceId(cResourceId);
    }
}
